﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    var keyValue = $.request("keyValue");
    $(function () {
        if (!!keyValue) {
            $.ajax({
                url: "/Topic/Setting/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data);
                }
            });
        }
    });
    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        $.submitForm({
            url: "/Topic/Setting/SubmitForm?keyValue=" + keyValue,
            param: $("#form1").formSerialize(),
            success: function () {
                $.currentWindow().$("#gridList").trigger("reloadGrid");
            }
        })
    }
</script>

<form id="form1">
    <div style="padding-top: 20px; margin-right: 20px;">
        <table class="form">
            <tr>
                <th class="formTitle">专题代码</th>
                <td class="formValue">
                    <input id="F_Code" name="F_Code" type="text" class="form-control required" placeholder="请录入专题编号" />
                </td>
                <th class="formTitle">背景图片</th>
                <td class="formValue" rowspan="8" valign="top">
                    <input id="F_BgImage" name="F_BgImage" type="text" class="form-control required" placeholder="请录入背景图片" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">专题名称</th>
                <td class="formValue">
                    <input id="F_Name" name="F_Name" type="text" class="form-control required" placeholder="请录入专题名称" />
                </td>
                <th class="formTitle"></th>
            </tr>
            <tr>
                <th class="formTitle">背景颜色</th>
                <td class="formValue">
                    <input id="F_BgColor" name="F_BgColor" type="text" class="form-control required" placeholder="请录入背景颜色" />
                </td>
                <th class="formTitle"></th>
            </tr>
            <tr>
                <th class="formTitle">排序</th>
                <td class="formValue">
                    <input id="F_Sort" name="F_Sort" type="text" class="form-control required" placeholder="请录入排序" />
                </td>
                <th class="formTitle"></th>
            </tr>
            <tr>
                <th class="formTitle">是否在网站显示</th>
                <td class="formValue">
                    <label class="checkbox-inline">
                        <input type="radio" name="F_IsWeb" id="F_IsWeb1" value="1" checked> 启用
                    </label>
                    <label class="checkbox-inline">
                        <input type="radio" name="F_IsWeb" id="F_IsWeb2" value="0"> 禁用
                    </label>
                </td>
                <th class="formTitle"></th>
            </tr>
            <tr>
                <th class="formTitle">是否在移动端显示</th>
                <td class="formValue">
                    <label class="checkbox-inline">
                        <input type="radio" name="F_IsWap" id="F_IsWap1" value="1" checked> 启用
                    </label>
                    <label class="checkbox-inline">
                        <input type="radio" name="F_IsWap" id="F_IsWap2" value="0"> 禁用
                    </label>
                </td>
                <th class="formTitle"></th>
            </tr>
            <tr>
                <th class="formTitle">是否在小程序显示</th>
                <td class="formValue">
                    <label class="checkbox-inline">
                        <input type="radio" name="F_IsWeChat" id="F_IsWeChat1" value="1" checked> 启用
                    </label>
                    <label class="checkbox-inline">
                        <input type="radio" name="F_IsWeChat" id="F_IsWeChat2" value="0"> 禁用
                    </label>
                </td>
                <th class="formTitle"></th>
            </tr>
            <tr>
                <th class="formTitle">状态</th>
                <td class="formValue">
                    <label class="checkbox-inline">
                        <input type="radio" name="F_State" id="F_State1" value="1" checked> 启用
                    </label>
                    <label class="checkbox-inline">
                        <input type="radio" name="F_State" id="F_State2" value="0"> 禁用
                    </label>
                </td>
                <th class="formTitle"></th>
            </tr>
        </table>
    </div>
</form>


